# Maintainer: Zoltan Gyarmati <zgyarmati@zgyarmati.de>

_realname=dwarfstack
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.1
pkgrel=1
pkgdesc="Provides stacktrace with source file/line information"
arch=('any')
url="https://github.com/ssbssa/dwarfstack"
license=('LGPL')
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
             "${MINGW_PACKAGE_PREFIX}-binutils")
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/ssbssa/${_realname}/archive/${pkgver}.tar.gz")
sha256sums=('c9dcb64c23e714b5ea1a87f4723c2ac6cd99d25fb0805b56e4403edff11c4d0f')

build() {
  cd "${srcdir}/${_realname}-${pkgver}/"
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}/"
  install -D -m644 "${srcdir}/${_realname}-${pkgver}/LICENSE.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
  make install PREFIX="${pkgdir}${MINGW_PREFIX}/"
}
